//
//  OneClientIDService.m
//  chatModule
//
//  Created by sy on 2024/11/27.
//

#import "OneClientIDService.h"
//#import "userInfoModel.h"
#import "MSUserManager.h"

@implementation OneClientIDService
- (NSString*)port{
    return @"/app_server/v1/chat/bind_client_id";
}

- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}

- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end

@implementation OneUploadChatFileService
- (NSString*)port{
    return @"/app_server/v1/chat/upload_chat_file";
}

- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end
